Loading...
 

ObjectList, OList, TreeList

ObjectList, OList, TreeList

For displaying object lists please use the newer and faster ObjectListView!

ObjectList(name~aliasName, flags, x, y, w, h)

Parameters
Parameters Description
name * Identifier or CLASS::expr
aliasName an additional identifier
flags Flags
x * Position X (in minicells)
y * Position Y (in Minicells)
w * Width (in minicells)
h * Height (in minicells)
  • - Required parameter

The tuple (class, access expression) defines an image on model data (see FillWindow, DrainWindow). With the ObjectList relations between objects can be displayed and edited interactively.

Each entry in the list represents exactly one object and shows selected data related to the object. For the representation of lists, the ObjectList was replaced by the faster and more modern ObjectListView. However, in contrast to the ObjectListView , the ObjectList can display tree structures in a list-like manner (multi-column) and thus mixes the concepts of the ListView and the tree. The representation as so-called TreeList is only possible if the flag VIEW_ONLY is set for the ObjectList. The collection that is expanded when the tree is expanded is specified as in the tree using the format flag NODE .

The TreeList should not be used to display large amounts of data because it is not suitable for this purpose. In MorphIt the ObjectList is also displayed as TreeList and the state of the expanded nodes is synchronised with the native TreeList. In contrast to the native TreeList, MorphIT displays the column headers indicated with HEADER . A further limitation of the TreeList is that it is not possible for the user to sort the entries.


The Object User Box is programmed with the following instructions:

The Widget command places an ObjectList on the stack so that the methods and attributes of a widget can be accessed.

The following methods are offered by the ObjectList:

Flags
Flags Description
ACCEPT_DROP Objects dragged over the screen from another object box can be placed in the object box with drag-and-drop. What to do with the objects must be described in the action list (see example).
CAR_POSITION The X-positions are calculated automatically, so they do not have to be explicitly specified with SetFormat .
BITMAP_SIZE If bitmaps are displayed (generated via a push statement in a SetFormat ), they are stretched to column width without this flag. This only occurs if the width of the column is specified (e.g. by a header), or if the column width is not only determined by the bitmaps due to additional strings in the column despite AUTO_POSITION. The specification of the flag prevents this, so that each bitmap is guaranteed to be displayed in its original size.
CONTEXTMENU(identifier) The identifier is an identifier of an item within a Menu or ContextMenuList declaration. The submenu hanging under this item is shown automatically when the right mouse button is pressed. If thereupon a menu item is selected the respective action is started as described for item, in the same way as if the menu item had been called from the main menu.
Additionally you can get the menu item via ContextMenu from which window object the menu item was called via ContextMenu when you execute SELECT for the corresponding item with GetCurrentWidget. With a call from the main menu GetCurrentWidget returns NULL.

If a ContextMenu should not appear automatically, then it can be called (according to design guidelines this should be done as reaction to the right mouse button, thus within MOUSE_CLICK_R ) by means of PopupMenu also from InstantView®. In this case you should not use the CONTEXTMENU flag, otherwise the menu will appear twice (once automatically, once controlled).

GRIDMENU(identifier) Sets the grid menu. The identifier is an identifier of an item within a Menu or ContextMenuList declaration.
DRAG_COPY The currently selected objects can be dragged to another object box or to a window with the right mouse button (drag and drop). The objects can only be dropped on a target with flag ACCEPT_DROP. The list box entries are retained.
DRAG_MOVE As with DRAG_COPY, the currently selected objects can be dragged to another object box or to a window. The corresponding list box entries are deleted if the objects have been placed in another list box or window with the flag ACCEPT_DROP.
ENTIRE The following mode exists for the representation of a collection or m-1 or m-n relation with FillWindow and DrainWindow:
The object box shows only the objects of the collection, m-1 or m-n relation. This mode is activated with the ENTIRE flag.
HELP(anchor) Help("file#anchor") connects the window object with online help in HTML format. If no file name is specified, the HTML file specified in the module applies.
HIDDEN The object box remains invisible until the Show instruction makes it appear on the screen.
HZ_SCROLL_BAR In addition to the vertical scrollbar, the object box also has a horizontal scrollbar.
ITEM(w, h), ITEM(w), ITEM(, h) If the width and height of a list box entry deviate from the dimensions specified by the size of the list box, they are indicated in this way. A larger width is useful together with flag HZ_SCROLL_BAR. Multi-line entries require an explicit height specification.
LIST_INVALID (from 4.2) Normally, only valid objects are added to an Object User Box. However, when this flag is set, invalid objects are also included and displayed.
MIN_HEIGHT(h) The height of the list is never less than the value h (given in minicells). This is especially useful in combination with attachments.
MIN_WIDTH(w) width of the list does not fall below the value w (specified in minicells). This is especially useful in combination with attachments.
NO_DRAIN The object box is filled by FillWindow, but is ignored by DrainWindow.NULL_ELEMENT
The object box automatically creates an entry that does not refer to any object. A NULL element is useful if the Object box is used with FillWindow and DrainWindow to display a pointer or a 1-1 or 1-m relation.
OPTIMIZE

The optimisation refers to the access expressions for the columns of the list (compare statement SetFormat): identical partial expressions are evaluated only once(further notes ...).

SELECT_MULTIPLE It is possible to select several objects simultaneously.
TOOLTIP(mlString) The specified string is displayed as a tooltip or, if an event TOOLTIP is also defined, is passed to it. The tooltip is automatically triggered by the system after a certain period of time when the mouse cursor remains over the window object. The string can be multilingual. The current language is passed to the event.

For the delimitation and detailed description of the presentation options see: ObjectListView